package com.wxblockchain.core.base;


import android.app.Activity;

import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;

import com.wxblockchain.core.network.task.BaseTask;

/**
 * Created by louyaming on 2020/04/21
 * <p/>
 * app与framework通信的接口
 */
public interface BaseCoreSupport {
    /**
     * 账号在别处登录
     */
    void onSessionInvaild();

    /**
     * 获取用户phoneNumber
     *
     * @return
     */
    String getPhoneNumber();

    /**
     * 获得token
     *
     * @return
     */
    String getToken();
    /**
     * 页面间的跳转
     * @param activity activity
     * @param id 模块ID
     * @param params
     */
    void goToActivity(Activity activity, int id, String params);

    /**
     * 页面间的跳转
     * @param activity activity
     * @param id 模块ID
     * @param url H5模块 路径 native模块该参数可为空
     * @param params
     */
    void goToActivity(Activity activity, int id, String url, String params);

    /**
     * 获取应用的apptype
     *
     * @return
     */
    String getAppType();


    DialogFragment showNetworkProcessDialog(BaseTask taskExchangeModel, FragmentManager fragmentManager, String tag);
}
